package publics.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="news")
public class News {//企业贷款种类
	
	private Integer id;// ID    int not null
	private String title;//新闻标题    varchar(10) not null
	private Date date;// 发布日期时间  not null
	private String content;  //新闻内容  text
	private String buildPeople;//发布人
	
	@Id
	@GeneratedValue
	@Column(name="New_id")
	public Integer getId() {
		return id;
	}
	@Column(name="New_title")
	public String getTitle() {
		return title;
	}
	@Column(name="New_date")
	public Date getDate() {
		return date;
	}
	@Column(name="New_content")
	public String getContent() {
		return content;
	}
	@Column(name="New_buildPeople")
	public String getBuildPeople() {
		return buildPeople;
	}
	
	public void setId(Integer id) {
		this.id = id;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public void setDate(Date date) {
		this.date = date;
	}
	public void setContent(String content) {
		this.content = content;
	}
	public void setBuildPeople(String buildPeople) {
		this.buildPeople = buildPeople;
	}
	
	
	public News() {
		super();
		// TODO Auto-generated constructor stub
	}
	
	public News(Integer id, String title, Date date) {
		super();
		this.id = id;
		this.title = title;
		this.date = date;
	}
	
	public News(Integer id, String title, Date date, String content,
			String buildPeople) {
		super();
		this.id = id;
		this.title = title;
		this.date = date;
		this.content = content;
		this.buildPeople = buildPeople;
	}
	/* (non-Javadoc)
	 * @see java.lang.Object#toString()
	 */
	@Override
	public String toString() {
		return "News [buildPeople=" + buildPeople + ", content=" + content
				+ ", date=" + date + ", id=" + id + ", title=" + title + "]";
	}
	
	
}
